<template>
  <van-tabs
    v-model="active"
    offset-top="60px"
    sticky
    title-active-color="#C41719"
    @click="$emit('on-tab', active)"
  >
    <van-tab title="全部" name="全部">
      <slot></slot>
    </van-tab>
    <van-tab title="社区" name="社区">
      <slot></slot>
    </van-tab>
    <van-tab title="校园" name="校园">
      <slot></slot>
    </van-tab>
    <van-tab title="工地" name="工地">
      <slot></slot>
    </van-tab>
    <van-tab title="交通" name="交通">
      <slot></slot>
    </van-tab>
    <van-tab title="文旅" name="文旅">
      <slot></slot>
    </van-tab>
    <van-tab title="质检" name="质检">
      <slot></slot>
    </van-tab>
    <van-tab title="座舱" name="座舱">
      <slot></slot>
    </van-tab>
    <van-tab title="车机" name="车机">
      <slot></slot>
    </van-tab>
    <van-tab title="建筑" name="建筑">
      <slot></slot>
    </van-tab>
  </van-tabs>
</template>
  <script>
export default {
  data() {
    return {
      active: "1",
    };
  },
  methods: {
    // handleClick() {
    //   console.log(this.activeName);
    // },
  },
};
</script>

<style scoped>
</style>